package exception;

public class ThorwDemo {
    public static void main(String[] args) {
        Porson p=new Porson();
        //p.setAge(16);
       // p.setAge(1000);
        System.out.println("此人年龄是："+p.getAge());
    try{
        p.setAge(1000);
    }catch(IllegalAgeException e){
        e.printStackTrace();
    }
        System.out.println("此人年龄："+p.getAge());
        System.out.println("程序结束");
    }



}
